// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * PurchaseRgoodsOrder
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "purchase_rgoods_order", autoResultMap = true)
@Schema(title = "采购退货单")
@RoleData2(groupId = 2, funcKey = "PurchaseRgoodsOrder")
public class PurchaseRgoodsOrder implements Serializable {

  /**
   * 采购仓库
   */
  @TableField(value = "`wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "采购仓库")
  private Long wid;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 退货单号
   */
  @TableField(value = "`order_no`")
  @Schema(title = "退货单号")
  private String orderNo;

  /**
   * 创建人
   */
  @TableField(value = "`creator_user`")
  @JoinField(SysUser.class)
  @Schema(title = "创建人")
  private Long creatorUser;

  /**
   * 创建时间
   */
  @TableField(value = "`creator_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date creatorTime;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 供应商
   */
  @TableField(value = "`supplier_id`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplierId;

  /**
   * 采购单号
   */
  @TableField(value = "`purchase_order_code`")
  @Schema(title = "采购单号")
  private String purchaseOrderCode;

  /**
   * 币种
   */
  @TableField(value = "`purchase_currency`")
  @Schema(title = "币种")
  private String purchaseCurrency;

  /**
   * 采购员
   */
  @TableField(value = "`buyer_uid`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long buyerUid;

  /**
   * 退款方式 (1 - 退货扣款; 2 - 退货补货; )
   */
  @TableField(value = "`return_method`")
  @Schema(title = "退款方式")
  private String returnMethod;

  /**
   * 退货运费
   */
  @TableField(value = "`shipping_price`")
  @Schema(title = "退货运费")
  private java.math.BigDecimal shippingPrice;

  /**
   * 其他费用
   */
  @TableField(value = "`other_fee`")
  @Schema(title = "其他费用")
  private java.math.BigDecimal otherFee;

  /**
   * 退货时间
   */
  @TableField(value = "`application_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "退货时间")
  private java.util.Date applicationDate;

  /**
   * 退货原因
   */
  @TableField(value = "`return_reason`")
  @Schema(title = "退货原因")
  private String returnReason;

  /**
   * 附件
   */
  @TableField(value = "`file`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "附件")
  private List<SysFile> file;

  /**
   * 申请部门
   */
  @TableField(value = "`dept`")
  @JoinField(SysDepartment.class)
  @Schema(title = "申请部门")
  private Long dept;

  /**
   * 状态 (0 - 待审批; 1 - 已驳回; 2 - 已作废; 3 - 已处理; )
   */
  @TableField(value = "`status`")
  @Schema(title = "状态")
  private String status;

  /**
   * 备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "备注")
  private String remark;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 标签
   */
  @TableField(value = "`label`")
  @Schema(title = "标签")
  private String label;

  /**
   * 店铺
   */
  @TableField(value = "`sid`")
  @JoinField(ShopInfo.class)
  @Schema(title = "店铺")
  private Long sid;

  /**
   * MSKU/FNSKU
   */
  @TableField(value = "`msku`")
  @Schema(title = "MSKU/FNSKU")
  private String msku;

  /**
   * 可用品退货量
   */
  @TableField(value = "`quantity_availble`")
  @Schema(title = "可用品退货量")
  private Integer quantityAvailble;

  /**
   * 备注
   */
  @TableField(value = "`remarks`")
  @Schema(title = "备注")
  private String remarks;

  /**
   * 次品退货量
   */
  @TableField(value = "`quantity_unavailble`")
  @Schema(title = "次品退货量")
  private Integer quantityUnavailble;
}
